status=$(/bin/pidof haproxy | wc -l)
if [ "${status}" = "0" ]; then
    systemctl start haproxy

    status2=$(/bin/pidof haproxy | wc -l)

    if [ "${status2}" = "0"  ]; then
        systemctl stop keepalived
    fi
fi